<div id="js-top"></div>
<ul class="layui-fixbar">
  <li class="layui-icon layui-fixbar-top" style="display: list-item;"></li>
</ul>
<script>
// require : layui layui.css
;layui.use("jquery",function($){
  $("body").on("click",".layui-fixbar-top",function(){
    $('#js-top').get(0).scrollIntoView({
      behavior: "smooth",
      block: "nearest",
    });
  });
})
</script>